package com.xiaoshangkou.hellopra.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaoshangkou.hellopra.pojo.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {

    //查询用户所拥有的所有角色id值
    List<Integer> findRoleIdByAdmin(Integer aid);
    //删除用户所有权限
    void deleteRoleAllPermission(Integer rid);

    //给用户添加权限
    void addRolePermission(@Param("rid") Integer rid, @Param("peid")Integer peid);
}
